/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.hazard.setting.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.hazard.common.constant.enums.HazardSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.admin.api.resolver.enums.SysDictEnum;
import com.hopes.boss.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 数采仪管理
 *
 * @author daijie
 * @date 2023-11-01 10:15:39
 */
@Data
@TableName(value = "haz_basic_rtu_config", excludeProperty = "tenantId")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "数采仪管理")
public class HazBasicRtuConfigEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;

	/**
	 * 所属企业
	 */
	@Schema(description = "所属企业")
	private Long orgId;

	/**
	* 设备名称
	*/
    @Schema(description="设备名称")
    private String deviceName;

	/**
	* 设备唯一编码
	*/
    @Schema(description="设备唯一编码")
    private String deviceCode;

	/**
	* 传输协议
	*/
    @Schema(description="传输协议")
    private String protocolType;

	/**
	* 是否使用
	*/
    @Schema(description="是否使用")
    private String useFlag;

	/**
	* 厂商
	*/
    @Schema(description="厂商")
    private String supplier;

	/**
	* 规格型号
	*/
    @Schema(description="规格型号")
    private String specification;

	/**
	* 位置
	*/
    @Schema(description="位置")
    private String deviceLocation;

	/**
	* 备注
	*/
    @Schema(description="备注")
    private String remarks;

	/**
	* 是否断网 1.是 0.否
	*/
    @Schema(description="是否断网 1.是 0.否")
    private String brokenNetFlag;

	/**
	* 图片
	*/
    @Schema(description="图片")
    private String photo;


    public String getOrgIdStr() {
    	return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company, this.getOrgId());
	}

	public String getUseFlagStr() {
		return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getUseFlag());
	}

	public String getBrokenNetFlagStr() {
    	return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getBrokenNetFlag());
	}

	public String getProtocolTypeStr() {
		return DictResolver.getItemLabelByValue(HazardSysDictEnum.park_protocol_type, this.getProtocolType());
	}
}
